<template>
  <!-- 单行文本 -->
  <a-input
    :placeholder="getProps?.placeholder"
    allow-clear
    :max-length="getProps?.textMax"
    show-word-limit
    v-model="formValue"
  />
</template>
<script setup lang="ts">
import useFormComponent from "@/hooks/useFormComponent";

const getProps = withDefaults(
  defineProps<{
    placeholder?: string;
    textMax: number;
  }>(),
  {}
);
const { formValue } = useFormComponent();
</script>
